import '../util/ab_value_converter.dart';

class ABConfig {
  final String? data;
  final String? name;

  ABConfig({this.data, this.name});

  factory ABConfig.fromJson(Map<String, dynamic> json) {
    return ABConfig(
      data: valueToString(json['data']),
      name: valueToString(json['name']),
    );
  }

  static var allConfig = <ABConfig>[];
  static var currentLanguageCode = 'en';
  static get googleKey => allConfig.firstWhere((element) => element.name == 'google_translation_key').data;
}